#ifndef FAMILYMODEL_H
#define FAMILYMODEL_H

#include <QAbstractTableModel>
#include <dbmscontainer.h>

class FamilyModel : public QAbstractTableModel, public DbmsContainer
{
    Q_OBJECT
    QVariant mqv_ten_index;
    SLEE_HDB_REC_LST mqhl_data;
    QVariantList    mqvl_indexes;

public:
    explicit FamilyModel(QObject *parent = 0);

    void load_data(QVariant qv_ten_index);

    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;
    QVariant headerData(int section, Qt::Orientation orientation, int role) const;

    QVariant get_db_index(const QModelIndex &index);
    QModelIndex get_model_index(const QVariant &qv_index);
    SLEE_HDB_REC get_data(const QVariant &qv_index);
    void update_data(const QVariant &qv_index);

signals:

public slots:

};

#endif // FAMILYMODEL_H
